<template>
  <div>
    <!-- 顶部导航栏 -->
    <div class="top">
      <van-icon
        @click="wode()"
        class="arrowLeft"
        style="top: 10px"
        name="arrow-left"
        color="pink"
        size="30"
      />
      <div class="searchbox">
        <div class="box">
          <img
            class="fangdajing"
            src="https://image.hongbeibang.com/FltPAS-35CZfvSpnHacXWoqcfFz5?42X42&imageView2/1/w/42/h/42"
            alt=""
          />
          <div style="width: 10px"></div>
          <span>搜索</span>
        </div>
      </div>
    </div>

    <!-- 食谱/食单/问答/文章 -->
    <van-tabs v-model="active">
      <van-tab title="食谱"></van-tab>
      <van-tab title="食单"></van-tab>
      <van-tab title="问答"></van-tab>
      <van-tab title="文章"></van-tab>
    </van-tabs>

    <!-- 下方区域 -->
    <div class="down">
      <!-- 左边图片 -->
      <div class="left">
        <img
          src="https://image.hongbeibang.com/FnyLuIoMwNTnEsbPXZpV4W8EcRYI?200X200&imageView2/1/w/120/h/120"
          alt=""
        />
      </div>
      <!-- 右侧文字区域 -->
      <div class="right">
        <p>默认食单</p>
        <div class="box">
          <img
            src="https://image.hongbeibang.com/FjCS2x65YlGzHBdBBp-OnbFqp4PS?200X200&imageView2/1/w/38/h/38"
            alt=""
          />
          <span>0个食谱</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      active: 0,
    };
  },
  methods: {
    wode() {
      this.$router.push({
        path: "/wode",
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.top {
  width: 339px;
  display: flex;
  padding: 0 18px;
  .searchbox {
    width: 229px;
    height: 35px;
    padding: 0 10px;
    margin: 4.5px 30px 4.5px 20px;
    border-radius: 4px;
    background-color: #f5f7f9;
    .box {
      display: flex;
      line-height: 35px;
      justify-content: center;
      .fangdajing {
        margin-top: 9px;
        height: 18px;
        width: 18px;
      }
      span {
        font-size: 12px;
        color: #999;
      }
    }
  }
}
.down {
  width: 350px;
  height: 110px;
  margin: 10px 15px;
  display: flex;
  .left {
    display: flex;
    height: 110px;
    width: 150px;
    background-color: #f5f7f9;
    border-radius: 10px;
    margin-top: 20px;
    img {
      margin: 23px auto;
      height: 60px;
      width: 60px;
    }
  }
  .right {
    margin-left: 20px;
    margin-top: 40px;
    display: flex;
    height: 110px;
    width: 195px;
    flex-direction: column;
    p {
      height: 22px;
      width: 175px;
      font-size: 16px;
      color: #4a4945;
    }
    .box {
      margin-top: 30px;
      display: flex;
      img {
        height: 19px;
        width: 19px;
      }
      span{
        margin-left: 10px;
        font-size: 12px;
        color: #999999;
      }
    }
  }
}
</style>
